package com.chaoXing.work3.wor3_3;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

import static com.chaoXing.work3.wor3_3.Test.TEXT;

public class FileSave implements Dao{


    @Override
    public void saveDate(Object o)  {

        System.out.println("文件存储");
        try (

                Writer fw=new FileWriter("C:\\java_work\\chaoXing\\work2\\src\\com\\chaoXing\\work3\\wor3_3\\test.txt",true);
        )
        {
            char[] buffer =TEXT.toCharArray();
            fw.write(buffer);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
